package pop6;
import java.util.Scanner;
public class IO {
	public static void main(String args[]){
	 
        Scanner scanner = new Scanner( System.in );
        char ans;
		do{
			Board board = new Board();
	        board.init();
	        board.display();
	        System.out.print("Input the type of ball you want to pop:");
	        String input = scanner.nextLine();
	        char type = input.charAt(0); 
	        Ball ball=board.getNextBall(type);
	        board.display();
	        scanner = new Scanner( System.in );
	        System.out.print("Input the coloumn you want to pop the ball:");
	        input = scanner.nextLine();
	        int col = Integer.parseInt(input); 
	        board.clearBall(ball);
	        ball.setCol(col);
	        ball.setRow(2);
	        board.placeBall(ball);
	        board.display();
	        board.clearBallsAfter(ball);
	        board.display();
	        System.out.print("Restart?[Y/N]:");
	        input  = scanner.nextLine();
	        ans = input.charAt(0); 
	        
        }while(ans=='Y');
    }
}